package com.weixin.paleituo.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.weixin.paleituo.R;
import com.weixin.paleituo.activity.GoodsStoreActivity;
import com.weixin.paleituo.base.BaseRecycleAdapter;
import com.weixin.paleituo.bean.WordOfMouthStoreBean;
import com.weixin.paleituo.help.RecycleViewHolder;
import com.weixin.paleituo.util.UIUtils;

import java.util.List;

/**
 * Author yichao
 * Time  2018/4/24 16:28
 * Dest  品牌推荐
 */

public class BrandRecommandAdaptet extends BaseRecycleAdapter<WordOfMouthStoreBean> {
    public BrandRecommandAdaptet(Context context, List<WordOfMouthStoreBean> datas) {
        super(context, datas, R.layout.remand_homefragment);
    }

    @Override
    protected void setData(RecycleViewHolder holder,final WordOfMouthStoreBean wordOfMouthStoreBean, int position) {
        ImageView imageView=holder.getItemView(R.id.iv_remand_homefragment);
        UIUtils.loadImageViewRoud(mContext,wordOfMouthStoreBean.getImg(),imageView,6);

        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
             GoodsStoreActivity.startActivity(mContext,wordOfMouthStoreBean.getStoreId());

            }
        });

    }
}
